package com.bestcem.xm.user.util.convert;

import com.bestcem.xm.user.controller.vo.user.*;
import com.bestcem.xm.user.controller.vo.user.request.CompleteOrgInfoVO;
import com.bestcem.xm.user.controller.vo.user.request.FastRegisterVO;
import com.bestcem.xm.user.service.dto.redis.FastCreateUserDTO;
import com.bestcem.xm.user.service.dto.redis.UserRegisterDTO;
import com.bestcem.xm.user.service.dto.user.*;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * 层级转换类
 *
 * @author wangyunyun <yunyun.wang@idiaoyan.com>
 * @version v1.0
 * @date 2022/3/1 14:30
 */
@Mapper(componentModel = "spring")
public interface UserLoginConvert {

    OrgRegisterDTO orgRegisterVo2Dto(OrgRegisterVO vo);

    UserLoginVO userLoginDto2Vo(UserLoginDTO dto);

    RefreshTokenVO refreshTokenDto2Vo(RefreshTokenDTO dto);

    OrgLoginDTO orgLoginVo2Dto(OrgLoginVO orgLoginVO);

    CompleteOrgInfoDTO completeOrgInfoVo2Dto(CompleteOrgInfoVO completeOrgInfoVO);

    List<WjwOrganizationInfoVO> wjwOrganizationInfoDtosToVos(List<WjwOrganizationInfoDTO> wjwOrganizationInfos);

    OrgRegisterDTO fastRegisterVo2Dto(FastRegisterVO fastRegisterVO);

    @Mapping(target = "phone", source = "mobile")
    UserLoginDTO needMfa2UserLoginDTO(JudgeNeedMfaLoginDTO judgeNeedMfaLoginDTO);

    UserRegisterDTO fastCreateUserDto2Register(FastCreateUserDTO fastCreateUserDTO);
}
